package com.pro.common.service.config;

import com.pro.common.service.properties.CommonProperties;
import com.pro.common.service.service.NacosConfigInitService;
import com.pro.common.service.properties.NacosConfigReadProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(NacosConfigReadProperties.class)
public class NacosConfig {
    @Autowired CommonProperties commonProperties;
    @Bean
    NacosConfigInitService nacosConfigInitService(NacosConfigReadProperties nacosConfigReadProperties) {
        return new NacosConfigInitService(nacosConfigReadProperties);
    }
}

